﻿Namespace Dados

    Public Class Conexao

        Public Shared Property ConnectionString As String

        Public Shared Function SetConnectionString() As String

            If String.IsNullOrWhiteSpace(ConnectionString) Then
                ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\AESP.mdf;Integrated Security=True;User Instance=True"
            End If

            Return ConnectionString

        End Function

    End Class

    Partial Public Class dcDadosDataContext

        Public Sub New()
            MyBase.New(Dados.Conexao.ConnectionString, mappingSource)
            OnCreated()
        End Sub

    End Class

End Namespace


